<?php

namespace app\common\model;

use think\Model;


class AppAdPosition extends Model
{





    // 表名
    protected $name = 'app_ad_position';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'exhibition_text'
    ];



    public function getExhibitionList()
    {
        return ['1' => __('Exhibition 1'), '2' => __('Exhibition 2'), '3' => __('Exhibition 3')];
    }


    public function getExhibitionTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['exhibition']) ? $data['exhibition'] : '');
        $list = $this->getExhibitionList();
        return isset($list[$value]) ? $list[$value] : '';
    }




}
